#!/usr/bin/env python
#
# Copyright 2015 Grand Share team (NSC2015).
#
from google.appengine.ext import ndb


class RPiBox(ndb.Model):
    id = ndb.StringProperty(required=True)
    users = ndb.StringProperty(repeated=True)
    created = ndb.DateTimeProperty(auto_now_add=True)
    updated = ndb.DateTimeProperty(auto_now=True)


class User(ndb.Model):
    id = ndb.StringProperty(required=True)
    created = ndb.DateTimeProperty(auto_now_add=True)
    updated = ndb.DateTimeProperty(auto_now=True)
    name = ndb.StringProperty(required=True)
    profile_url = ndb.StringProperty(required=True)
    access_token = ndb.StringProperty(required=True)